<link rel="stylesheet" type="text/css" href="<?php echo url::base(FALSE) ?>css/content.css">
<table>
    <tr><td id="dbmenu">Database Menu</td><td></td></tr>
	<tr colspan="3">
		<td align="center">
			<?php if (isset($errors)) : //jika ada variabel error?>
            <?php foreach ($errors as $error): ?>
            <div><?php echo $error ?></div>
            <?php endforeach ?>
            <?php endif ?>
		</td>
	</tr>
    <tr>
        <td width="70%" class="content">
            <table class="tabcontent" border="1" align="center" width="100%">
                <tr>
                    <td width="50">ID</td>
                    <td>Nama Menu</td>
                    <td>Harga Jual</td>
                </tr>
                <?php if (isset($menus)): ?>
                    <?php foreach ($menus->get_all_menu() as $menu) : ?>
                        <tr>
                            <td><?php echo $menu->ID_menu ?></td>
                            <td><?php echo $menu->nama_menu ?></td>
                            <td><?php echo $menu->harga_jual ?></td>
                        </tr>
                    <?php endforeach ?>
                <?php endif; ?>
            </table>
        </td>
        <td class="input">
            <form action="<?php echo url::site() . 'menu' ?>" method="post" >
                <table cellspacing="5">
                    <tr><td colspan="3" align="center">Tambah Menu Baru</td></tr>
                    <tr>
						<td>ID Menu</td><td style="width:5px">:</td><td align="right"><input name="ID_menu" type="text"></td>
					</tr>
					<tr>
                        <td>Nama Menu </td><td style="width:5px">:</td><td align="right"><input name="nama_menu" type="text"/></td>
                    </tr>
                    <tr>
                        <td>Harga </td><td style="width:5px">:</td><td align="right"><input name="harga_jual" type="text"/></td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <table>
                                <?php foreach ($stoks as $stok) : ?>
                                <tr>
                                    <td width="150">
                                        <?php echo $stok->nama ?>
                                    </td>
                                    <td>
                                        <input name="<?php echo $stok->ID_stok ?>" type="text" size="2"/>
                                    </td>
                                </tr>
                                <?php endforeach ?>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2"></td><td align="right"><input type="submit" value="Submit" /></td>
                    </tr>
                </table>
            </form>
        </td>
    </tr>
</table>